package writtenTraining.day43;

import java.util.*;

/**
 * day43(1):二项概率 + 组合数:kotori和抽卡（二）
 */

public class Main {
    public static void main(String[] args) {
//         二项概率 + 组合数
        //         输入数据
        Scanner in = new Scanner(System.in);
        int n = in.nextInt(), m = in.nextInt();
        double ret = 1.0000;
        
        double count = m, i = n;
//         计算组合数上方
        while(count > 0) {
            ret *= i;
            i--;
            count--;
        }
        
//         计算组合数下方
        for(i = m; i >= 1; i--) {
            ret /= i;
        }
        
//         最终二项分布计算概率
        for( i = 1; i <= m; i++) {
            ret *= 0.8;
        }
        
        for(i = 1; i <= n - m; i++) {
            ret *= 0.2;
        }
        
        System.out.printf("%.4f\n",ret);
    }
}



class Main2 {
    public static void main(String[] args) {
//         排序 + 二分

        // 输入数据
        Scanner in = new Scanner(System.in);
        int n = in.nextInt(),
                l = in.nextInt(), r = in.nextInt();
        Integer[] nums = new Integer[n];
        for(int i = 0; i < n; i++) {
            nums[i] = in.nextInt();
        }

        // 排序
        Arrays.sort(nums);
        long ret = 0L;
        for(int i = 0; i < n; i++) {
            int num = nums[i];
//             二分
            int num1 = num + l, num2 = num + r;
            if (num1 > nums[n-1]) {
                break;
            }
            // 左边界 >= num1
            int left = 0, right = n - 1;
            while(left < right) {
                int mid = left + (right - left) / 2;
                if(nums[mid] < num1) {
                    left = mid + 1;
                } else {
                    right = mid;
                }
            }
            int f1 = left;

            // 右边界 <= num2
            left = 0; right = n - 1;
            while(left < right) {
                int mid = left + (right - left + 1) / 2;
                if(nums[mid] > num2) {
                    right = mid - 1;
                } else {
                    left = mid;
                }
            }

            ret += (right - f1 + 1);
        }

        // 输出结果
        System.out.println(ret);
    }
}

/**
 * day43:(2)排序 +二分：ruby和薯条
 */


 class Main3 {
    public static void main(String[] args) {
//         排序 + 二分

        // 输入数据
        Scanner in = new Scanner(System.in);
        int n = in.nextInt(),
                l = in.nextInt(), r = in.nextInt();
        Integer[] nums = new Integer[n];
        for(int i = 0; i < n; i++) {
            nums[i] = in.nextInt();
        }

        // 排序
        Arrays.sort(nums);
        long ret = 0L;
        for(int i = 0; i < n; i++) {
            int num = nums[i];
//             二分
            int num1 = num + l, num2 = num + r;
//             特判一下
            if (num1 > nums[n-1]) {
                break;
            }
            // 左边界 >= num1
            int left = 0, right = n - 1;
            while(left < right) {
                int mid = left + (right - left) / 2;
                if(nums[mid] < num1) {
                    left = mid + 1;
                } else {
                    right = mid;
                }
            }
            int f1 = left;

            // 右边界 <= num2
            left = 0; right = n - 1;
            while(left < right) {
                int mid = left + (right - left + 1) / 2;
                if(nums[mid] > num2) {
                    right = mid - 1;
                } else {
                    left = mid;
                }
            }

            ret += (right - f1 + 1);
        }

        // 输出结果
        System.out.println(ret);
    }
}

/**
 * day43(3):动态规划 + 子问题 + 空间优化：AB27 循环汉诺塔
 */


 class Main4 {
    public static void main(String[] args) {
        // 动态规划 + 子问题 + 空间优化
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();

        // 创建dp
        long AB = 1L;
        long AC = 2L;
        // 初始化
        AB = 1; AC = 2;
        for(int i = 2; i <= n; i++) {
            long b = (2 * AC + 1) % 1000000007;
            long c = (2 * AC + AB + 2) % 1000000007;
            AB = b;
            AC = c;
        }

        System.out.println(AB + " " + AC);
    }
}